package com.serotonin.modbus4j.msg;

import com.serotonin.modbus4j.base.ModbusUtils;
import com.serotonin.modbus4j.exception.ModbusTransportException;
import com.serotonin.util.queue.ByteQueue;

public class MyReportSlaveIdRequest  extends ReportSlaveIdRequest{

	public MyReportSlaveIdRequest(int slaveId) throws ModbusTransportException {
		super(slaveId);
	}

	@Override
	protected void writeRequest(ByteQueue queue) {
        //通过重写方法，来完成自己的要求。
		System.out.println("aaaaaa");
		byte temp=queue.pop();
     	queue.pop();
    	ModbusUtils.pushByte(queue,0x15);
    	ModbusUtils.pushByte(queue,0x1);
    	ModbusUtils.pushByte(queue,0x0);
    	ModbusUtils.pushByte(queue,0x0);
    	ModbusUtils.pushByte(queue,0x0);
     	ModbusUtils.pushByte(queue,0x6);
     	ModbusUtils.pushByte(queue,0x1);
     	ModbusUtils.pushByte(queue,0x3);
     	ModbusUtils.pushShort(queue,0x4);
     	ModbusUtils.pushShort(queue,0x2);
        System.out.println(queue.toString());   	

	}
    
}
